package com.lagou.demo03.service;

import com.lagou.demo03.dao.StudentQueryDao;
import com.lagou.demo03.factory.StudentQueryDaoFactory;
import com.lagou.demo03.model.Student;

import java.util.List;

public class StudentQueryService {
    private StudentQueryDao studentQueryDao;
    public StudentQueryService(){
        this.studentQueryDao = StudentQueryDaoFactory.getStudentQueryDao();
    }

    /**
     * 自定义成员方法实现根据参数指定的Student对象来调用DAO层实现信息查询功能
     */
    public List<Student> studentItemService(){
        return studentQueryDao.studentQuery();
    }
}
